<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <h2>{{message}}</h2>
        <cpn><button slot="left">点击</button></cpn>
    </div>
    <script src="vue/vue.js"></script>
    <template id="my-cpn">
    <div>
        <h2>{{information}}</h2>
        <!-- 插槽的基本使用可以有默认值， -->
        <slot name="left"><span>左边</span> </slot>
        <slot name="center"><span>中间</span> </slot>
        <slot name="right"><span>右边</span> </slot>
    </div>
    </template>
    <script>
        const cpn = {
            template:'#my-cpn',
            data(){
                return {
                    information:'信息'
                }
            }
        }
        const vm=new Vue({
            el:'#app',
            data:{
                message:'Hellow World!',
            },
            methods:{
            },
            computed:{},
            components:{
                cpn
            }
        });
    </script>
</body>
</html>